package a.e.b.a;

import a.c.d;
import a.c.k;
import a.c.q;
import a.e.b.b.a;
import a.e.b.b.ab;
import a.e.b.b.t;
import a.e.b.b.v;
import a.e.b.g;
import a.f.cd;
import a.f.ed;
import a.i.jb;
import org.w3c.dom.Element;
import org.w3c.dom.Node;

public class fb
  implements v
{
  private static jb a;
  static Class b;
  public static boolean c;
  
  public static void a(jb paramjb)
  {
    a = paramjb;
  }
  
  public static jb b(jb paramjb)
  {
    return a;
  }
  
  public boolean a(Element paramElement)
  {
    if (!i.i) {
      if (!g.a(paramElement, a.e.b.i.d)) {
        return false;
      }
    }
    String str = paramElement.getAttribute("yfiles.type");
    return "portconstraints".equals(str);
  }
  
  protected a.c.i a(q paramq, Object paramObject)
  {
    k localk = paramq.c(paramObject);
    if ((i.i) || ((localk instanceof a.c.i))) {
      return (a.c.i)localk;
    }
    return null;
  }
  
  cd a(String paramString1, String paramString2)
  {
    boolean bool2 = i.i;
    int i = i.h;
    byte b1 = 0;
    if (!bool2) {
      if ("north".equals(paramString1))
      {
        b1 = 1;
        if (bool2) {
          break label113;
        }
        if (i == 0) {
          break label107;
        }
      }
    }
    if (!bool2) {
      if ("south".equals(paramString1))
      {
        b1 = 2;
        if (bool2) {
          break label113;
        }
        if (i == 0) {
          break label107;
        }
      }
    }
    if (!bool2) {
      if ("east".equals(paramString1))
      {
        b1 = 4;
        if (bool2) {
          break label113;
        }
        if (i == 0) {
          break label107;
        }
      }
    }
    if (!bool2) {
      if ("west".equals(paramString1)) {
        b1 = 8;
      }
    }
    label107:
    label113:
    boolean bool1 = "true".equals(paramString2);
    return cd.a(b1, bool1);
  }
  
  public ab a()
  {
    return ab.g;
  }
  
  public void a(t paramt, Node paramNode)
    throws a
  {
    boolean bool = i.i;
    int i = i.h;
    d locald = (d)paramt.b();
    q localq = paramt.d();
    Node localNode = paramNode.getFirstChild();
    label199:
    label208:
    do
    {
      while (i == 0)
      {
        if (localNode == null) {
          break;
        }
        if (!bool)
        {
          if (localNode.getNodeType() == 1)
          {
            Element localElement = (Element)localNode;
            if (bool) {
              continue;
            }
            if ("PortConstraint".equals(localElement.getLocalName()))
            {
              String str1 = localElement.getAttribute("endpoint");
              String str2;
              String str3;
              Object localObject;
              a.c.i locali;
              String str4;
              if (!bool) {
                if ("source".equals(str1))
                {
                  str2 = localElement.getAttribute("side");
                  str3 = localElement.getAttribute("strong");
                  if (!bool)
                  {
                    if ("".equals(str2)) {
                      if (bool) {
                        break label208;
                      }
                    }
                  }
                  else {
                    if ("".equals(str3)) {
                      break label199;
                    }
                  }
                  localObject = a(localq, ed.a);
                  if ((bool) || (localObject != null)) {
                    ((a.c.i)localObject).a(locald, a(str2, str3));
                  }
                  localObject = localElement.getAttribute("groupid");
                  if (bool) {
                    continue;
                  }
                  if ("".equals(localObject)) {
                    break label541;
                  }
                  locali = a(localq, ed.c);
                  if (!bool) {}
                  str4 = (bool) || (a != null) ? a.a((String)localObject, b == null ? (fb.b = a("java.lang.Object")) : b) : ((String)localObject).intern();
                  if (bool) {
                    continue;
                  }
                  if (locali == null) {
                    break label541;
                  }
                  locali.a(locald, str4);
                  if (bool) {
                    continue;
                  }
                  if (i == 0) {
                    break label541;
                  }
                }
              }
              if (bool) {
                continue;
              }
              if ("target".equals(str1))
              {
                str2 = localElement.getAttribute("side");
                str3 = localElement.getAttribute("strong");
                if (!bool)
                {
                  if ("".equals(str2)) {
                    if (bool) {
                      break label436;
                    }
                  }
                }
                else {
                  if ("".equals(str3)) {
                    break label427;
                  }
                }
                localObject = a(localq, ed.b);
                if ((bool) || (localObject != null)) {
                  ((a.c.i)localObject).a(locald, a(str2, str3));
                }
                localObject = localElement.getAttribute("groupid");
                if (bool) {
                  continue;
                }
                if (!"".equals(localObject))
                {
                  locali = a(localq, ed.d);
                  if (!bool) {}
                  str4 = (bool) || (a != null) ? a.a((String)localObject, b == null ? (fb.b = a("java.lang.Object")) : b) : ((String)localObject).intern();
                  if (bool) {
                    continue;
                  }
                  if (locali != null) {
                    locali.a(locald, str4);
                  }
                }
              }
            }
          }
          localNode = localNode.getNextSibling();
        }
      }
    } while (bool);
    label427:
    label436:
    return;
  }
  
  public void a(t paramt)
    throws a
  {}
  
  static Class a(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.e.b.a.fb
 * JD-Core Version:    0.7.0.1
 */